package com.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@Controller
//访问路径http://localhost:8080/user/quick
@RequestMapping(value = "/user")
public class UserController {
    //访问路径http://localhost:8080/quick
    //method =RequestMethod.GET 提交方式必须为get
    // params = {"name"} 请求参数必须有name 例如http://localhost:8080/user/quick?name=xxx
    @RequestMapping(value = "/quick",method =RequestMethod.GET,params = {"name"})
    public String save(){
        System.out.println("Controller save running");
       //  /success.jsp的/表示从当前web应用下找资源
        //在spring-Mvc.xml手动配置内部资源视图解析器，也就是success的前路径和后缀
        return "success";
    }
}
